<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<form id="tableact" action="/updStudent" method="post">
    <table  border="0" cellspacing="0" cellpadding="10">
        <tr>
            <td>学号 number</td>
            <td><input th:value="${sNum}"  readonly="readonly" class="inpu" type="text" name="sNum"
                       id="sNum"/></td>
        </tr>
        <tr>
            <td>姓名 Name</td>
            <td><input class="inpu" type="text" placeholder="请输入姓名" name="sName" id="sName"/></td>
        </tr>
        <tr>
            <td>性别 Gender</td>
            <td>
                <select name="gender">
                    <option value="男">男</option>
                    <option value="女">女</option>
                </select>
            </td>
        </tr>
        <tr>
            <td>出生日期 Birthday</td>
            <td><input class="inpu" type="date" placeholder="请输入出生日期" name="birthday" id="birthday"/></td>
        </tr>
        <tr>
            <td>手机号 Phone</td>
            <td><input class="inpu" type="text" placeholder="手机号" name="phone" id="phone"/></td>
        </tr>

        <tr>
            <td>讲师 Teacher</td>
            <td>
                <select name="tId">
                    <option value="1">小1</option>
                    <option value="2">小2</option>
                </select>
            </td>
        </tr>

        <tr>
            <td>班级 Class</td>
            <td>
                <select name="cId">
                    <option value="1">中级班</option>
                    <option value="2">高级班</option>
                </select>
            </td>
        </tr>

        <tr>
            <td>学院 Institute</td>
            <td>
                <select name="iId">
                    <option value="1">中级学院</option>
                    <option value="2">高级学院</option>
                </select>
            </td>
        </tr>
        <tr>
            <td>
                <input type="submit"  class="updButton" value="修改" style="width: 90px;height:26px
                ;background-color: lightblue;color:white;border:none;" />
            </td>
        </tr>
    </table>
</form>
</body>

<script src="webjars/jquery/2.1.0/jquery.min.js"></script>
<script>

$(function (){

    $(".updButton").click(function (){

        var a = $(this);
        var sNum = $(this).parent().prevAll().eq(5).val();
        console.log(sNum);

        $("#tableact").submit();
    })

})

</script>
</html>